﻿@using System.Web.UI.WebControls
@model ClientSite2nd.Models.Client

@{
    ViewBag.Title = "Your Account";
}

@section Header {
    @Html.ActionLink("Back", "Index", "Home", null, new { data_icon = "arrow-l", data_rel = "back" })
    <h1>@ViewBag.Title</h1>
}
<style>
    table th
    {
        text-align: left;
    }

    img.Profile
    {
        width: 100px;
        height: 100px;
        border: 1px solid black;
    }
</style>
<p>
    Logged in as <strong>@Model.UserName</strong>.
</p>

@if(Model.ProfilePicture==null)
{
    <img src="@Url.Content("~/Content/images/noImage.png")" alt="Profile image" class="Profile" />
}
else
{
    <img src="@Url.Action("GetProfileImage")" alt="Profile image" class="Profile" />
}

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Company)
        </th>
        <td>
            @Html.DisplayFor(model => model.Company)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.FirstName)
        </th>
        <td>
            @Html.DisplayFor(model => model.FirstName)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.LastName)
        </th>
        <td>
            @Html.DisplayFor(model => model.LastName)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <td>
            @Html.DisplayFor(model => model.Email)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.BirthdayDate)
        </th>
        <td>
            @Html.DisplayFor(model => model.BirthdayDate)
        </td>
    </tr>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Address)
        </th>
        <td>
            @Html.DisplayFor(model => model.Address)
        </td>
    </tr>
</table>

<ul data-role="listview" data-inset="true">
    <li>@Html.ActionLink("Edit profile", "EditProfile")</li>
    <li>@Html.ActionLink("Change password", "ChangePassword")</li>
    <li>@Html.ActionLink("Log off", "LogOff")</li>
</ul>
